package com.dks.controller.pay;

import com.dks.enumeration.CashCouponStatus;
import com.dks.repository.ICashCouponRepository;
import com.dks.repository.impl.pay.WxPayRepository;
import com.dks.result.ResultModel;
import com.dks.util.PageInfo;
import com.dks.vo.pay.CashCouponVo;
import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse;
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

/**
 * 代金券相关
 */
@RestController
@RequestMapping("wx-pay")
public class WxPayNotifyController {

    @Autowired
    private WxPayRepository wxPayRepository;


    @PostMapping("/notify")
    public String parseOrderNotifyResult(@RequestBody String xmlData) throws WxPayException {
        return wxPayRepository.handleBuyPackagePayNotify(xmlData);
    }

}
